package com.cos.springboot.lession67.config;

import com.cos.springboot.lession67.entity.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: COS
 * @time: 2021/12/1 10:18
 * @description:
 * @Configuration 用于配置的注解类
 */
@Configuration
public class UserConfig {
    /**
     *
     * @author: COS
     * @return:
     * @time: 2021/12/1 10:20
     * @description:
     * @Bean 用于提供对象实例使用
     */
    @Bean(name="wahaha")
    public User user(){
        return new User("张三", 18,"男");
    }

    /*
    *
    * <bean id="wahaha"></bean>
    *
    * */


}
